//
//  UIBarButtonItem+Extension.swift
//  microblog
//
//  Created by 记忆不为 on 16/9/23.
//  Copyright © 2016年 记忆不为. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    
    convenience init(imageName: String) {
        let button = UIButton()
        button.setImage(UIImage(named: imageName), for: .normal)
        button.setImage(UIImage(named: imageName + "_highlighted"), for: .highlighted)
        button.sizeToFit()
        self.init(customView: button)
    }
}
